import request from "@/utils/request";
import uploadFileRequest from "@/utils/upload_file_request";

// 发送短信验证码
export const sendVerificationCodeApi = (options: any) => {
    return request({
        method: "POST",
        url: "/api/common/send-verification-code/",
        data: options
    })
}
// 上传API
export const PostUploadFileApi = (options: any) => {
    return uploadFileRequest({
        method: "POST",
        url: "/api/common/uploadFile",
        data: options
    })
}


// 账号登录
export const accountNumberLoginApi = (options: any) => {
    return request({
        method: "POST",
        url: "/api/users/login",
        data: options
    })
}

// 验证码登录
export const verifyCodeLoginApi = (options: any) => {
    return request({
        method: "POST",
        url: "/api/users/verify-code-login",
        data: options
    })
}
// 获取用户列表
export const getUserListApi = (options: any) => {
    return request({
        method: "GET",
        url: "/api/users/get-userList",
        data: options
    })
}
// 获取用户信息
export const getUserInfoApi = (options: any) => {
    return request({
        method: "GET",
        url: "/api/users/get-userInfo",
        data: options
    })
}


// 修改用户信息
export const updateUserInfoApi = (options: any) => {
    return request({
        method: "PUT",
        url: "/api/users/updata-userInfo",
        data: options
    })
}

// 删除用户
export const deleteUser = (options: any) => {
    return request({
        method: "DELETE",
        url: "/api/delete-user/",
        data: options
    })
}
// 获取角色列表

export const getRoleListApi = (options: any) => {
    return request({
        method: "GET",
        url: "/api/role/get-role",
        data: options
    })
}
// 新增角色
export const addRoleApi = (options: any) => {
    return request({
        method: "POST",
        url: "/api/role/add-role",
        data: options
    })
}

// 删除角色
export const deleteRoleApi = (options: any) => {
    return request({
        method: "DELETE",
        url: "/api/role/delete-role",
        data: options
    })
}

// 编辑角色
export const editRoleApi = (options: any) => {
    return request({
        method: "PUT",
        url: "/api/role/update-role",
        data: options
    })
}






// 获取菜单列表

export const getMenuListApi = (options: any) => {
    return request({
        method: "GET",
        url: "/api/menu/get-menu",
        data: options
    })
}
// 新增菜单
export const addMenuApi = (options: any) => {
    return request({
        method: "POST",
        url: "/api/menu/add-menu",
        data: options
    })
}

// 删除菜单
export const deleteMenuApi = (options: any) => {
    return request({
        method: "DELETE",
        url: "/api/menu/delete-menu",
        data: options
    })
}

// 编辑菜单
export const editMenuApi = (options: any) => {
    return request({
        method: "PUT",
        url: "/api/menu/update-menu",
        data: options
    })
}




// 获取字典列表

export const getDictionaryListApi = (options: any) => {
    return request({
        method: "GET",
        url: "/api/dictionary/get-dictionary",
        data: options
    })
}
// 新增字典
export const addDictionaryApi = (options: any) => {
    return request({
        method: "POST",
        url: "/api/dictionary/add-dictionary",
        data: options
    })
}

// 删除字典
export const deleteDictionaryApi = (options: any) => {
    return request({
        method: "DELETE",
        url: "/api/dictionary/delete-dictionary",
        data: options
    })
}

// 编辑字典
export const editDictionaryApi = (options: any) => {
    return request({
        method: "PUT",
        url: "/api/dictionary/update-dictionary",
        data: options
    })
}


// 获取分类列表

export const getClassificationListApi = (options: any) => {
    return request({
        method: "GET",
        url: "/api/classify/get-classify",
        data: options
    })
}
// 新增分类
export const addClassificationApi = (options: any) => {
    return request({
        method: "POST",
        url: "/api/classify/add-classify",
        data: options
    })
}

// 删除分类
export const deleteClassificationApi = (options: any) => {
    return request({
        method: "DELETE",
        url: "/api/classify/delete-classify",
        data: options
    })
}

// 编辑分类
export const editClassificationApi = (options: any) => {
    return request({
        method: "PUT",
        url: "/api/classify/update-classify",
        data: options
    })
}

// 获取资源列表

export const getNavigationStationListApi = (options: any) => {
    return request({
        method: "GET",
        url: "/api/resource/get-resource",
        data: options
    })
}
// 新增资源
export const addNavigationStationApi = (options: any) => {
    return request({
        method: "POST",
        url: "/api/resource/add-resource",
        data: options
    })
}

// 删除资源
export const deleteNavigationStationApi = (options: any) => {
    return request({
        method: "DELETE",
        url: "/api/resource/delete-resource",
        data: options
    })
}

// 编辑资源
export const editNavigationStationApi = (options: any) => {
    return request({
        method: "PUT",
        url: "/api/resource/update-resource",
        data: options
    })
}

// 获取站点收录列表

export const getSiteInclusionListApi = (options: any) => {
    return request({
        method: "GET",
        url: "/api/siteInclusion/get-siteInclusion",
        data: options
    })
}
// 新增站点收录
export const addSiteInclusionApi = (options: any) => {
    return request({
        method: "POST",
        url: "/api/siteInclusion/add-siteInclusion",
        data: options
    })
}

// 删除站点收录
export const deleteSiteInclusionApi = (options: any) => {
    return request({
        method: "DELETE",
        url: "/api/siteInclusion/delete-siteInclusion",
        data: options
    })
}

// 编辑站点收录
export const editSiteInclusionApi = (options: any) => {
    return request({
        method: "PUT",
        url: "/api/siteInclusion/update-siteInclusion",
        data: options
    })
}
// 获取广告列表
export const getAdvertisementListApi = (options: any) => {
    return request({
        method: "GET",
        url: "/api/advertisement/get-advertisement",
        data: options
    })
  }
  
  // 新增广告
  export const addAdvertisementApi = (options: any) => {
    return request({
        method: "POST",
        url: "/api/advertisement/add-advertisement",
        data: options
    })
  }
//   编辑广告
  export const editAdvertisementApi = (options: any) => {
    return request({
        method: "PUT",
        url: "/api/advertisement/update-advertisement",
        data: options
    })
  }
//   删除广告
  export const deleteAdvertisementApi = (options: any) => {
    return request({
        method: "DELETE",
        url: "/api/advertisement/delete-advertisement",
        data: options
    })
  }
  
//   获取首页统计数据
  export const getStatisticalChartTableApi = (options: any) => {
    return request({
        method: "GET",
        url: "/api/common/get-statistical-chart-table",
        data: options
    })
  }
  
  // 获取留言列表
export const getLeaveMessageListApi = (options: any) => {
    return request({
        method: "GET",
        url: "/api/leave-message/get-leave-message",
        data: options
    })
  }
  
  // 新增留言
  export const addLeaveMessageApi = (options: any) => {
    return request({
        method: "POST",
        url: "/api/leave-message/add-leave-message",
        data: options
    })
  }
//   编辑留言
  export const editLeaveMessageApi = (options: any) => {
    return request({
        method: "PUT",
        url: "/api/leave-message/update-leave-message",
        data: options
    })
  }
//   删除留言
  export const deleteLeaveMessageApi = (options: any) => {
    return request({
        method: "DELETE",
        url: "/api/leave-message/delete-leave-message",
        data: options
    })
  }